import webuiapi

api = webuiapi.WebUIApi(host='http://124.71.137.227/', port=7860)

result1 = api.txt2img(prompt="cute squirrel",
                      negative_prompt="ugly, out of frame",
                      seed=1003,
                      styles=["anime"],
                      cfg_scale=7,
                      #                      sampler_index='DDIM',
                      #                      steps=30,
                      #                      enable_hr=True,
                      #                      hr_scale=2,
                      #                      hr_upscaler=webuiapi.HiResUpscaler.Latent,
                      #                      hr_second_pass_steps=20,
                      #                      hr_resize_x=1536,
                      #                      hr_resize_y=1024,
                      #                      denoising_strength=0.4,

                      )
# images contains the returned images (PIL images)
result1.images

# image is shorthand for images[0]
result1.image

# info contains text info about the api call
result1.info

# info contains paramteres of the api call
result1.parameters

result1.image